﻿using System;
using System.Data;
using System.Configuration;


namespace MySQLStudio.Common
{
    public class ErrorMessages
    {
        public static string GetString(string strString)
        {
            return strString;
        }

        public static string GetString(string strString, string param1)
        {
            return string.Format(strString, param1);
        }

        public static string GetString(string strString, string param1, string param2)
        {
            return string.Format(strString, param1, param2);
        }

        public static string GetString(string strString, string param1, string param2, string param3)
        {
            return string.Format(strString, param1, param2, param3);
        }


        public const string DataBaseAccess_failed_to_execute_reader = "Failed to execute database reader";
        public const string DataBaseAccess_failed_to_execute_non_query = "Failed to execute statement";

        public const string InformationSchema_Failed_to_retrive_databases = "Failed to retrieve databases list";
        public const string InformationSchema_Failed_to_extract_database_in_database = "Failed to extract tables in database '{0}'";
        public const string InformationSchema_Failed_to_extract_stored_procedures_in_database = "Failed to extract stored procedures in database '{0}'";
        public const string InformationSchema_Failed_to_generate_stored_procedure_create_statement = "Failed to generate stored procedure '{0}' create statement";
        public const string InformationSchema_Failed_to_generate_stored_procedure_alter_statement = "Failed to generate stored procedure `{0}`.`{1}` alter statement";
        public const string InformationSchema_Failed_to_execute_create_procedure_statement = "Failed to execute create procedure statement {0}";
        public const string InformationSchema_Failed_to_delete_stored_procedure = "Failed to delete procedure `{0}`.`{1}`";
        public const string InformationSchema_Failed_to_extract_columns_for_table = "Failed to extract columns of the specified table '{0}'";
        public const string InformationSchema_Failed_to_extract_collations = "Failed to extract collations";
        public const string InformationSchema_Failed_to_rename_table = "Failed to rename the table '{0}'";
        public const string InformationSchema_Failed_to_rename_table_column = "Failed to rename the column '{0}' in the table '{1]'";
        public const string InformationSchema_Failed_to_delete_table = "Failed to delete the table '{0}'";
        public const string InformationSchema_Failed_to_create_table = "Failed to create the table '{0}'";
        public const string InformationSchema_Failed_to_alter_table = "Failed to alter the table '{0}'";
        public const string InformationSchema_Failed_to_drop_database = "Failed to delete database '{0}'";

        public const string Provider_Schema_Version_Not_Match = "The '{0}' requires a database schema compatible with schema version '{1}'.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.";


        public const string Encryption_key_not_found = "Encryption key was not found";
        public const string Encryption_initialization_vector_not_found = "IV not found";

        public const string Parameter_too_long = "The parameter '{0}' is too long: it must not exceed {1} chars in length.";
        public const string Parameter_can_not_be_empty = "The parameter '{0}' must not be empty.";
        public const string Parameter_can_not_be_null = "The parameter '{0}' must not be null";
        public const string Parameter_can_not_be_null_or_empty = "Parameter '{0} 'can not be null or empty";
        public const string Parameter_can_not_contain_comma = "The parameter '{0}' must not contain commas.";
        public const string Parameter_array_empty = "The array parameter '{0}' should not be empty.";
        public const string Parameter_duplicate_array_element = "The array '{0}' should not contain duplicate values.";
        public const string Parameter_failed_to_retrieve_value = "Failed to retrieve parameter value";
        public const string Parameter_invalid_value = "Invalid parameter - {0}";

        // Validation functions
        public const string PageIndex_bad = "The pageIndex must be greater than or equal to zero.";
        public const string PageIndex_PageSize_bad = "The combination of pageIndex and pageSize cannot exceed the maximum value of System.Int32.";
        public const string PageSize_bad = "The pageSize must be greater than zero.";
        public const string Value_too_big = "The value '{0}' can not be greater than '{1}'.";
        public const string Value_must_be_boolean = "The value must be boolean (true or false) for property '{0}'.";
        public const string Value_must_be_non_negative_integer = "The value must be a non-negative 32-bit integer for property '{0}'.";
        public const string Value_must_be_positive_integer = "The value must be a positive 32-bit integer for property '{0}'.";
        public const string Value_is_not_valid_datetime = "The value is not valid date time";
        public const string DateTime_unable_to_convert_datetime_to_datetimeId = "Unable to convert Date to DateID";        
    }
}
